/**
 * DEPENDENCIAS:
 * nenhuma
 * 
 * FUNCIONALIDADE:
 * Funcoes que configuram o datePicker do Jquery UI 
 */

/*
 funcao que, dado o id do campo
 transforma o mesmo em um datepicker padrao
 */
function datePicker(id){
	$( "#"+id).mask("99/99/9999", {placeholder:"_"});
	$.datepicker.setDefaults( $.datepicker.regional[ "" ] );
	$.datepicker.setDefaults( $.datepicker.regional[ "pt-BR" ] );
	var datepickercomponent = $("#"+id).datepicker({
		numberOfMonths: 1,
		dateFormat: "dd/mm/yy",
		yearRange: 'c-100:c+100',
		showOn: "button",
		buttonImage: "img/bt_calendar.gif",
		buttonImageOnly: true,
		buttonText: '',
		changeMonth: true,
		changeYear: true,
		showOtherMonths: true,
		selectOtherMonths: true, 
		buttonImageOnly: true,
		firstDay: '1',
		showButtonPanel: true
	});
    return	datepickercomponent;
}